//1.引入 request
import request from "../utils/request";
/*
注意： get方式 使用 params
post 方式 使用 data
*/


//获取 商品数据的接口
//params 参数 供给 查询和分页使用
export function fetchProductList(params) {
    return request({
        url: "product_list",
        method: "get",
        params: params
    })
}


export function fetchBrandList(params) {
    return request({
        url: "get_product_brand",
        method: "get",
        params: params
    })
}
export function addProduct(data) {
    return request({
        url: "create_product",
        method: "post",
        data: data
    })
}

export function fetchCateList(params) {
    return request({
        url: "get_product_category",
        method: "get",
        params: params
    })
}

export function fenLei(params,id) {
    return request({
        url: "get_product_category_list/"+id,
        method: "get",
        params: params
    })
}

 export function shangpingguanli(params) {
   return request({
         url: "get_product_brand_pag",
         method: "get",
         params: params
     })
 }

 export function deleteProduct(params) {
    return request({
          url: "delete_status",
          method: "get",
          params: params
      })
  }

  export function ShangChu(params) {
    return request({
          url: "delete_product_brand",
          method: "get",
          params: params
      })
  }

  export function LieXing(data) {
    return request({
        url: "create_product_attr",
        method: "post",
        data: data
    })
}

//create_product_cate  添加 商品分类信息
export function addProductCate(data) {
    return request({
        url: "create_product_cate",
        method: "post",
        data: data
    })
}

